/*
 * @Author: your name
 * @Date: 2020-08-24 14:36:44
 * @LastEditTime: 2020-08-26 08:50:52
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \exam\react-exam\src\service\exam.ts
 */
import request from '../utils/request';
import { AllExamItem, AddExamItme } from '../utils/interface';


/* 获取试卷列表 */
export let getPaperlist=(params?:AllExamItem)=>{
    return request.get('/exam/exam',{params:{...params}});
};

/* 创建试卷 */
export let AddExam=(params:AddExamItme)=>{
    return request.post('/exam/exam',{...params});
};

/* 更新试卷  question_ids:试题idjson化后的字符串 如：JSON.stringify(ids.join(‘,’)) */
export let updateExam=(question_ids:string)=>{
    return request.put('/exam/exam/w5tcy-g2dts');
};

/* 删除试卷 */
export let delExam=()=>{
    return request.delete('/exam/exam/w5tcy-g2dts');
};

/* 获取试卷详情（教师端）接口 */
export let detailExam=()=>{
    return request.get('/exam/exam/w5tcy-g2dts');
}
